<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Example</title>
    <link rel="stylesheet" href="style.css" type="text/css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
    <link rel="start" href="index.html" title="Clutter编程" />
    <link rel="up" href="appendix-implementing-actors.html" title="Appendix A. Implementing Actors" />
    <link rel="prev" href="appendix-implementing-actors-containers.html" title="Implementing Container Actors" />
    <link rel="next" href="appendix-implementing-scrolling.html" title="Appendix B. Implementing Scrolling in a Window-like Actor" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">Example</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="appendix-implementing-actors-containers.html"><img src="../icons/prev.png" alt="Prev" /></a> </td>
          <th width="60%" align="center">Appendix A. Implementing Actors</th>
          <td width="20%" align="right"> <a accesskey="n" href="appendix-implementing-scrolling.html"><img src="../icons/next.png" alt="Next" /></a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <div class="titlepage">
        <div>
          <div>
            <h2 class="title" style="clear: both"><a id="custom-container-example"></a>Example</h2>
          </div>
        </div>
      </div>
      <p>
The following example demonstrates the implementation of a box container that 
lays its child actors out horizontally. A real container should probably allow 
optional padding around the container and spacing between the child actors. 
You might also want to allow some child actors to expand to fill the available 
space, or align differently inside the container.
</p>
      <div class="figure">
        <a id="figure-custom-container"></a>
        <p class="title">
          <b>Figure A.2. Behaviour</b>
        </p>
        <div class="figure-contents">
          <div class="screenshot">
            <div>
              <img src="./figures/custom_container.png" alt="Behaviour" />
            </div>
          </div>
        </div>
      </div>
      <br class="figure-break" />
      <p>
        <a class="ulink" href="./examples/custom_container" target="_top">Source Code</a>
      </p>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="appendix-implementing-actors-containers.html"><img src="../icons/prev.png" alt="Prev" /></a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="appendix-implementing-actors.html">
              <img src="../icons/up.png" alt="Up" />
            </a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="appendix-implementing-scrolling.html"><img src="../icons/next.png" alt="Next" /></a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">Implementing Container Actors </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">
              <img src="../icons/home.png" alt="Home" />
            </a>
          </td>
          <td width="40%" align="right" valign="top"> Appendix B. Implementing Scrolling in a Window-like Actor</td>
        </tr>
      </table>
    </div>
  </body>
</html>
